package shoot;

import java.awt.image.BufferedImage;
import java.util.Iterator;

/**
 * 大敌机类
 * @author pc
 *
 */
public class BigAirPlane extends FlyingObject implements Enemy{
	private int speed;
	private static BufferedImage[] images=new BufferedImage[4];
	static {
		for (int i = 0; i < images.length; i++) {
			images[i]=loadImage("bigairplane"+i+".png");
		}
	}
	
	public BigAirPlane() {
		super(69, 99);
		speed=2;
	}
	
	int index=0;
	@Override
	public BufferedImage getImage() {
		// TODO Auto-generated method stub
		if (isLift()) {
			return images[0];
		} else if (isRemove()) {
			if (index==images.length) {
				status=DIE;
			}
			return images[index++];
		}
		//死掉，不返回数据
		return null;
	}
	
	@Override
	public void step() {
		// TODO Auto-generated method stub
		y+=speed;
	}
	
	@Override
	public int getScore() {
		// TODO Auto-generated method stub
		return 3;
	}
	
}
